﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PrismRegion.NewRegion.ViewModels
{
    public class DialogViewModel : IDialogAware
    {
        public DialogCloseListener RequestClose { get; set; }

        public bool CanCloseDialog()
        {
            return true;
        }

        public void OnDialogClosed()
        {
        }

        public void OnDialogOpened(IDialogParameters parameters)
        {
        }

        public DelegateCommand ShowViewCommand { get; set; }
        public DialogViewModel(IRegionManager regionManager)
        {
            ShowViewCommand = new DelegateCommand(() => {
                // 打开Subview
                regionManager.RequestNavigate("DialogRegion", "SubView");
            });
        }
    }
}
